package org.totoro.patterns.behavior.interpreter.demo;

/**
 * @author YHL
 * @version V1.0
 * @Description:
 * @date 2018-11-20
 */
public class ValueExpression<V> implements IExpression<V> {

    private V value;

    public ValueExpression(V value) {
        this.value = value;
    }

    @Override
    public V evaluate(Object context) {
        return value;
    }


    @Override
    public String toString() {
        return " " + value.toString() + " ";
    }
}
